// Affiliate php link cloaker v1.0
// Date 18:38 12/12/2016
// By Ben a.k.a DreamVB

#include <iostream>
#include <string>

using namespace std;
using std::cout;
using std::endl;

int main(int argc, char *argv[]){
	char link[260];

	cout << "--- Affiliate php link cloaker v1.0 ---\n\n";
	//Ask user to enter url
	cout << "Enter your affiliate url here : ";
	//Get usr
	gets(link);
	//Clear the screen
	system("cls");

	//Display copy message
	cout << "Copy the code below to your index.php file.\n\n";

	//Generate php redirect code
	cout << "--- CUT HERE ---" << endl;
	cout << "// Index.php" << endl;
	cout << "<?php" << endl;
	cout << "  header('Location: " << link << "');" << endl;
	cout << "?>" << endl;
	cout << "--- END CODE ---\n" << endl;

	system("pause");
	return EXIT_SUCCESS;
}